perm filename DOC.RLL[RDG,DBL]3 blob sn#543039 filedate 1980-11-17 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00003 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	Auxillary functions - Really in CORLL
C00006 00003	RLL-OPEN( kbname params )
C00012 ENDMK
C⊗;
Auxillary functions - Really in CORLL
RETRIEVE[ names kb noclose? ]
	This function is designed to (non-destructively) retreive
one or more units from a knowledge base. Note this kb may be one of the
knowledge bases currently open - in which case, the values returned  will
be the property/value pairs of U before this session started.

names	- Should be the list of unit names desired. [A single atom
	is acceptable as well.]
kb	- This should be the KB on which each member of names is stored.
	[If it is not of the form xxx.KB, the ".KB" will be tacked on.]
	If omitted, will use the KB associated with the first member
	of names if that unit is in a currently open KB, or will ask
	user for KB name.
noclose?- If NIL, will close the KB when done.

The value returned be a list whose members are of the form 
	(unit-name . (p1 v1 p2 v2 ... pN vN))
where unit-name is the name unit, and the pi's and vi's are the properties
and their corresponding values, respectively.
NOTE: if unable to find unit-name, the CDR of this list will be the atom
	"*** Trouble -- unable to find ***"
(Various other error conditions may be encountered - eg if the file could
not be found, or opened; or if it was not in a format CORLL would find 
acceptable (ie first position holding the pointer to the unit index.)

ReportAll[ filename ]
	This should be used to report all the modifications made to any
unit during this session. These are written onto the file filename.
(If ReportAll is called with no arguments, the user will be asked to 
supply the file name. Returning NIL, ) or ] will cause UP.REPORT to
be used. In any case, the file used will be the value of
the global variable UP.REPORTINGFILE.)
This is done by advising all the functions stored on the global UA.WRITINGFNS.
Notice this will significantly slow down the system.

Diagnose[ kb ]
	This function will check the knowledge base kb for syntactic
consistency. After putting all units, it reads through each unit, to confirm
that its entry is a list with an even number of values, and that every location
in the file is assigned to exactly one unit, or the free block list.
Warning messages are reported whenever a hole in encountered.
If more than one "thing" claims some space, an error message is printed,
and the name of the first unit involved is stored on the list this function
returns. [Note that this function returned NIL if no errors are encountered.]
Finally, this function will print a "." every 50 units it scans.
RLL-OPEN( kbname params )
	This opens the Knowledge Base, kbname, and does all sorts of other stuff.
  "kbname" can be the simple description (eg RLL),
	or full file name (as <CSD.RLL>EURISKO.KB.3), or anything inbetween.
  "params" is a list of the form
	(readwrite? (initializingfn? . args))
   where both "readwrite?" and "initializingfn?" ε {Y N NIL},
   and "args" is arbitrary. (This is passed to the initialization function.)
   [Here and below the value of Y means do this action, N means do NOT perform
    it, and NIL means to ask the user, when necessary, what to do.]

RLL-WRITE( kbname params )
	This does the work necessary to close the Knowledge Base, kbname.
  "kbname" is as above;
  "params" is a list of the form
	( (finishingfn? . args) )
   where "finishingfn?" ε {Y N NIL}, and "args" is passed to the
   finishing function (that is, the function whose name is stored on 
   the Status unit of the is KB - eg HEURS.STATUS)

RLL-SYSOUT( sysoutname params )
	This preserves the state of the system, in an EXE file.
  "sysoutname" is the value passed to SYSOUT.
  "params" is a list
	(CopyNow? NoLogout? CopyOnReturn? OpenAsIs?)
   where both "CopyNow?" and "CopyOnReturn?" are one of {Y N NIL} or a list
   of currently opened KBs, or descriptors thereof,
   "NoLogout?" ε {Y N NIL}, and "OpenAsIs?" is Y, N, NIL, BOTH, INPUT,
   or a list of elements (kbname . access), where "kbname" is a to be
   opened knowledge base, and "access" ε {Y BOTH INPUT}, where the value
   Y means to open this KB in whatever mode it had been.

Standard Functions, defaulted to RLL-1's knowledge bases:

StandardStartUp( kbname params )
	This initializes the Knowledge Base, kbname.
  "kbname" is as above.
  "params" is a list of the form
	(readfiles? (open-superiorKBs?  use-same-args?) reconnect-if-necessary?)
   where "readfiles?", "open-superiorKBs?" and "reconnect-if-necessary?" ε
   {Y N NIL} (following conventions mentioned above).
   If true, readfiles? means load in the files located on the ? slot of the kb's
   status unit; open-superiorKBs? means to open the networks which are
   necessary for this kb (these are stored on the Networks slot of that unit),
   and reconnect-if-necessary? means the inverse links of this kb's units
   should be readded, if there is some kb which appears unconnected with this kb.
   If "use-same-args?" is Y the same list of arguments will used when opening
   these superior kbs.
≡≡≡≡ ↑ This doesn't work ≡≡≡≡

StandardFinishUp( kbname params )
	This does the final work requires to close the Knowledge Base, kbname.
  "kbname" is as above.
  "params" is a list of the form
	(remove-virtual-slots? disconnect-from-otherKBs? diagnose? (makefile? . args))
   where "remove-virtual-slots?", "disconnect-from-otherKBs?", "diagnose?"
   and makefile? ε {Y N NIL}.
   If true, "remove-virtual-slots?" will remove the virtual slots of all the
   units of the kb; "disconnect-from-otherKBs?" means to remove inverse links,
   stored on OTHER (now open) knowledge bases which refer to units in this one;
   "diagnose?" will check this kb for syntactic accuracy, and "makefile?" tells
   the system to MAKEFILE over each associated file.  That command will also
   be passed "args" (eg (RC STF)) as a second argument.